﻿using MediatR;
using SystemHYS.API.Application.command.DeliveryCommand;
using SystemHYS.Domian;
using SystemHYS.Infrstructre.Interface;
namespace SystemHYS.API.Application.commandler.DeliveryCommandler
{
    public class DeliveryModelCommandler : IRequestHandler<DeliveryModelCommand, Delivery>
    {
        IDeliveryRepository deliveryRepository;
        public DeliveryModelCommandler(IDeliveryRepository deliveryRepository)
        {
            this.deliveryRepository = deliveryRepository;
        }

        public Task<Delivery> Handle(DeliveryModelCommand request, CancellationToken cancellationToken)
        {
            var list = deliveryRepository.GetModelAsnc(request.deliveryId);
            return list;
        }
    }
}
